<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
    <form action="#" name="Form" id="Form" method="post">
          <input type="hidden" name="knid" id="knid"  value="${data.knid}"/>
		  <input type="hidden" id="reId" name="reId" value="${reId}"/>
		  <input type="hidden" id="bzrrdjg" name="bzrrdjg" />
		  <input type="hidden" id="zzrdjg" name="zzrdjg" />
	    <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
			<tr>
				<td class="table-header" colspan="6">困难生认定</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 12%">姓名：</td>
				<td class="table-contentTD" style="width: 21%">${data.xm}</td>
				<td class="table-titleTD"  style="width: 12%">学号：</td>
				<td class="table-contentTD" style="width: 21%">${data.xh}</td>
				<td class="table-titleTD" style="width: 12%">性别：</td>
				<td class="table-contentTD" style="width: 22%">${data.xb}</td>
			</tr>
			<tr>
				<td class="table-titleTD">班级：</td>
				<td class="table-contentTD">${data.bjmc}</td>
				<td class="table-titleTD">专业：</td>
				<td class="table-contentTD">${data.zymc}</td>
				<td class="table-titleTD">年级：</td>
				<td class="table-contentTD">${data.njmc}</td>
			</tr>
			
			<tr>
				<td class="table-titleTD">出生日期：</td>
				<td class="table-contentTD">${data.csrq1}</td>
			
				<td class="table-titleTD">民族：</td>
				<td class="table-contentTD"><select id="mz" name="mz"  disabled="disabled" class="selectList">
						  <option value="">请选择</option>
							 <c:forEach items="${nationList}" var="code">
								<option value="${code.codename}">${code.codename}</option>
							</c:forEach>
				</select></td>
				<td class="table-titleTD">政治面貌：</td>
				<td class="table-contentTD"><select id="zzmm" name="zzmm"  disabled="disabled"   class="selectList">
						<option value="">无</option>
						<c:forEach items="${sysCodeList}" var="code">
							  <option value="${code.codename}">${code.codename}</option>
						</c:forEach>
				</select></td>
			</tr>
			
			<tr>
			    <td class="table-titleTD">户口所在地：</td>
			    <td class="table-contentTD">${data.hjszd}</td>
			    <td class="table-titleTD">联系电话：</td>
			    <td class="table-contentTD">${data.lxdh}</td>
			   <td class="table-titleTD">状态：</td>
			   <td class="table-contentTD">
				<c:if test="${data.states==0}">未提交</c:if>
				<c:if test="${data.states==1}">审核退回</c:if>
				<c:if test="${data.states==2}">审核中</c:if>
				<c:if test="${data.states==3}">审核通过</c:if>
				<c:if test="${data.states==8}">退回并结束</c:if>
				<c:if test="${data.states==9}">撤回</c:if>
				</td>
			</tr>
			
			<tr>
			   <td class="table-titleTD">申请认定理由：</td>
			   <td colspan="7" class="table-contentTD" style="color: #000000" >
						 <label><input type="checkbox" id="dbz"   disabled="disabled"  name="dbz" value="true" <c:if test="${data.dbz=='true'}">checked="checked"</c:if> />有效期内的低保证（含杭州市困难家庭救助证、低保边缘证）；证号：${data.dbzh}</label><br />
						 <label><input type="checkbox" id="fljgzm"   disabled="disabled"   name="fljgzm" value="true" <c:if test="${data.fljgzm=='true'}">checked="checked"</c:if> />福利机构监护对象证明；</label><br />
						 <label><input type="checkbox" id="gmlszn"   disabled="disabled"  name="gmlszn" value="true" <c:if test="${data.gmlszn=='true'}">checked="checked"</c:if> />革命烈士子女证明；</label><br />
						 <label><input type="checkbox" id="wbgydx"  disabled="disabled"  name="wbgydx" value="true" <c:if test="${data.wbgydx=='true'}">checked="checked"</c:if> />五保供养对象证明；</label><br />
						 <label><input type="checkbox" id="cjz"   disabled="disabled" name="cjz" value="true"  <c:if test="${data.cjz=='true'}">checked="checked"</c:if> />残疾学生残疾证；证号：${data.cjzh}</label><br />
						 <label><input type="checkbox" id="sqzm"  disabled="disabled"  name="sqzm" value="true" <c:if test="${data.sqzm=='true'}">checked="checked"</c:if> />社区（街道）签署意见并盖章后的《杭州市中等职业学校助学金申请表》及相关收入证明；</label><br />
						 <label><input type="checkbox" id="qtzj"  disabled="disabled" name="qtzj" value="true" <c:if test="${data.qtzj=='true'}">checked="checked"</c:if> />其他证件（含证号）:${data.qtzjsm}</label>
				</td>
			</tr>
			<tr>
				<td class="table-titleTD">备注:</td>
				<td class="table-contentTD" colspan="6" style="width: 100%">${data.remark}</td>
			</tr>
			
			<tr>
				    <td class="table-titleTD">班主任认定结果:</td>
				    <td colspan="6" class="table-contentTD" style="color: #000000" >
						 <label><input  type="checkbox" name="bzrrdjg1" value="家庭经济一般困难" />家庭经济一般困难</label><br />
						 <label><input type="checkbox"  name="bzrrdjg1" value="家庭经济困难" />家庭经济困难</label><br />
						 <label><input type="checkbox"  name="bzrrdjg1" value="家庭经济特殊困难" />家庭经济特殊困难</label><br />
						 <label><input type="checkbox"  name="bzrrdjg1" value="家庭经济不困难" />家庭经济不困难</label><br />
					</td>
			</tr>
			<tr>
				    <td class="table-titleTD">调整认定结果:</td>
				    <td colspan="6" class="table-contentTD" style="color: #000000" >
						 <label><input  type="checkbox" name="zzrdjg1" value="家庭经济一般困难" />家庭经济一般困难</label><br />
						 <label><input type="checkbox"  name="zzrdjg1" value="家庭经济困难" />家庭经济困难</label><br />
						 <label><input type="checkbox"  name="zzrdjg1" value="家庭经济特殊困难" />家庭经济特殊困难</label><br />
						 <label><input type="checkbox"  name="zzrdjg1" value="家庭经济不困难" />家庭经济不困难</label><br />
					</td>
			</tr>
			
		</table>
		
	   <br />
	   
	   <c:if test="${data.states!=0}">
		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
		     <c:if test="${checkFlag==1}">
					<tr>
						<td class="table-titleTD">审批意见：</td>
						<td class="table-contentTD" colspan="5" style="border: 0;"><input type="text" id="spyj" name="spyj" value="" class="inputText" style="width: 50%"/>&nbsp;&nbsp;	审批结果：
						<input type="radio" id="states" name="states" value="3" checked="checked"/>审核通过&nbsp;&nbsp;
						<input type="radio" id="states" name="states" value="1"/>拒绝&nbsp;&nbsp;
						<input type="button" id="btnSave"   class="inputButton" style="text-align: center;" value="完成审批" />&nbsp;&nbsp;
					    <input type="button" id="returnBut" autocomplete="off"  class="inputButton"value="返回" style="text-align: center;" />
						</td>
					</tr>
			 </c:if>
			<tr>
				<td class="table-titleTD" style="text-align: center;">序号</td>
				<td class="table-titleTD" style="text-align: center;">审批人</td>
				<td class="table-titleTD"  style="text-align: center;">审批步骤</td>
				<td class="table-titleTD" style="text-align: center;">审批结果</td>
				<td class="table-titleTD" style="text-align: center;">审批时间</td>
				<td class="table-titleTD" style="text-align: center;">审批意见</td>
			</tr>
			<c:forEach items="${chekResultList}" var="res" varStatus="status">
			<tr>
				<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
				<td class="table-contentTD" style="text-align: center;">${res.userName}</td>
				<td class="table-contentTD"  style="text-align: center;">${res.stepName}</td>
				<td class="table-contentTD" style="text-align: center;">${res.userState}</td>
				<td class="table-contentTD" style="text-align: center;">${res.approvalTime}</td>
				<td class="table-contentTD" style="text-align: center;">${res.comments}</td>
			</tr>
			</c:forEach>
	     </table>
	   </c:if>
	   </br>
	   
	 		<c:if test="${checkFlag==0}">
				<table cellpadding="0" cellspacing="0" border="0" align="left">
					<tr>
						 <td><input type="button" id="returnBut" autocomplete="off"  class="inputButton"value="返回" style="text-align: center;" /></td>
					</tr>
				</table>
			</c:if>
	</form>

		<script>
		 
			$(document).ready(function() {
				//保存
				$("#btnSave").click(function() {
					    $("#btnSave").attr("disabled",true);
								  layer.confirm("您是否确定审核吗?",{icon : 3,title : '提示',skin : 'layer-ext-moon'},function(index) {
									   var checks = document.getElementsByName("bzrrdjg1");
										var ids = "";
										if(checks&&checks.length>0){
											for(var i=0;i<checks.length;i++){
												if(checks[i].checked){
													if(ids.length>0)ids+=",";
													ids+=checks[i].value;
												}
											}
										}
										
										 var checks2 = document.getElementsByName("zzrdjg1");
											var ids2 = "";
											if(checks2&&checks2.length>0){
												for(var i=0;i<checks2.length;i++){
													if(checks2[i].checked){
														if(ids2.length>0)ids2+=",";
														ids2+=checks2[i].value;
													}
												}
											}
										
									/* 	if(ids==''){
												layer.alert("请选任认定至少一个结果", {icon: 5});
												return false; 
										}else{ */
											$('#bzrrdjg').val(ids);
										    $('#zzrdjg').val(ids2);
											document.Form.action = "${basePath}/zxjDifficultStudent/audit";
											document.Form.submit();	 	
										/* } */
										
								   },function(index) {
									    layer.close(index);
									    $("#btnSave").attr("disabled",false);
									});	
										
				 });
				  $("#returnBut").click(function() {
		 		 	  window.location.href='${basePath}/zxjDifficultStudent/index_audit';
		 		  });
			});
			 compareListValue(document.getElementById('zzmm'),'${data.zzmm}');
		     compareListValue(document.getElementById('mz'),'${data.mz}');
		 	
			    if("${isbzr}"=="true"){
			         $("input[type='checkbox'][name='zzrdjg1']").attr('disabled','disabled');
			    }else{
			    	 $("input[type='checkbox'][name='bzrrdjg1']").attr('disabled','disabled');
			    }
			    var bzrrdjg1="${data.bzrrdjg}";
			    var bzrrdjg = bzrrdjg1.split(",");
			    for(var i=0;i<bzrrdjg.length;i++){
			    	   $("input[name='bzrrdjg1'][value="+bzrrdjg[i]+"]").attr("checked","checked");
			    }
			    var zzrdjg1="${data.zzrdjg}";
			    var zzrdjg = zzrdjg1.split(",");
			    for(var i=0;i<bzrrdjg.length;i++){
			    	   $("input[name='zzrdjg1'][value="+zzrdjg[i]+"]").attr("checked","checked");
			    }
		     
			// $("input[type='checkbox']").attr('disabled','disabled');
		</script>

</body>
</html>
